package com.xique.park.service.service.impl;

import java.util.List;
import com.xique.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xique.park.mapper.ParkPayConfMapper;
import com.xique.park.bean.domain.ParkPayConf;
import com.xique.park.service.service.IParkPayConfService;

/**
 * 车场支付配置Service业务层处理
 * 
 * @author xique
 * @date 2021-12-09
 */
@Service
public class ParkPayConfServiceImpl implements IParkPayConfService 
{
    @Autowired
    private ParkPayConfMapper parkPayConfMapper;

    /**
     * 查询车场支付配置
     * 
     * @param id 车场支付配置ID
     * @return 车场支付配置
     */
    @Override
    public ParkPayConf selectParkPayConfById(Long id)
    {
        return parkPayConfMapper.selectParkPayConfById(id);
    }

    /**
     * 查询车场支付配置列表
     * 
     * @param parkPayConf 车场支付配置
     * @return 车场支付配置
     */
    @Override
    public List<ParkPayConf> selectParkPayConfList(ParkPayConf parkPayConf)
    {
        return parkPayConfMapper.selectParkPayConfList(parkPayConf);
    }

    /**
     * 新增车场支付配置
     * 
     * @param parkPayConf 车场支付配置
     * @return 结果
     */
    @Override
    public int insertParkPayConf(ParkPayConf parkPayConf)
    {
        parkPayConf.setCreateTime(DateUtils.getNowDate());
        return parkPayConfMapper.insertParkPayConf(parkPayConf);
    }

    /**
     * 修改车场支付配置
     * 
     * @param parkPayConf 车场支付配置
     * @return 结果
     */
    @Override
    public int updateParkPayConf(ParkPayConf parkPayConf)
    {
        parkPayConf.setUpdateTime(DateUtils.getNowDate());
        return parkPayConfMapper.updateParkPayConf(parkPayConf);
    }

    /**
     * 批量删除车场支付配置
     * 
     * @param ids 需要删除的车场支付配置ID
     * @return 结果
     */
    @Override
    public int deleteParkPayConfByIds(Long[] ids)
    {
        return parkPayConfMapper.deleteParkPayConfByIds(ids);
    }

    /**
     * 删除车场支付配置信息
     * 
     * @param id 车场支付配置ID
     * @return 结果
     */
    @Override
    public int deleteParkPayConfById(Long id)
    {
        return parkPayConfMapper.deleteParkPayConfById(id);
    }
}
